﻿using System.Windows.Shapes;

namespace VectorPicsEditor.Actions
{
    public class ResizeAction : Action
    {
        private readonly double oldWidth, oldHeight;

        public ResizeAction(Shape shape, double oldWidth, double oldHeight)
            : base(shape)
        {
            this.oldHeight = oldHeight;
            this.oldWidth = oldWidth;
        }

        public override void Undo()
        {
            base.Shape.Width = this.oldWidth;
            base.Shape.Height = this.oldHeight;
        }

        public override string GetDescription()
        {
            return "resize";
        }
    }
}